home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 318 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.4 KB

  1. From: fjh@munta.cs.mu.OZ.AU (Fergus Henderson)
  2. Message-ID: <4fih28$e3v@mulga.cs.mu.OZ.AU>
  3. X-Original-Date: 10 Feb 1996 16:27:52 GMT
  4. Path: in2.uu.net!bounce-back
  5. Date: 10 Feb 96 16:29:20 GMT
  6. Approved: fjh@cs.mu.oz.au
  7. Newsgroups: comp.std.c++,gnu.misc.discuss
  8. Subject: GNU coding standards (was: Re: Are all Windows programs ill-formed?)
  9. Followup-To: gnu.misc.discuss
  10. Organization: Comp Sci, University of Melbourne
  11. References: <AE5J83na99@qsar.chem.msu.su> <9602010236.26117@mulga.cs.mu.OZ.AU>     <9602021032.AA05302@lts.sel.alcatel.de> <4evp66$a58@mulga.cs.mu.OZ.AU> <KANZE.96Feb9165408@gabi.gabi-soft.fr>
  12. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  13.     iQBFAgUBMRzJ/uEDnX0m9pzZAQE2+QF/SteSQuNV1JMWyCukcbu9Z1AmOTaCClLR
  14.     MNcKDnrJHI8ctp79qqAXtigWyZsQhwDw
  15.     =N4bf
  16.  
  17. [This is starting to drift away from the topic of C++ standardization;
  18. I've cross-posted to gnu.misc.discuss and redirected followups. -fjh.]
  19.  
  20. kanze@gabi.gabi-soft.fr (J. Kanze) writes:
  21.  
  22. >Hmmm...  I believe in fact that the GNU coding guidelines actually
  23. >encourages you to use GNU extensions in everything but the compiler
  24. >itself (since it has to be compiled with the native C compiler).
  25.  
  26. No, that's not the case.  The GNU standards document says
  27.  
  28. |     Whether to use these extensions in implementing your
  29. |     program is a difficult question.
  30. ...
  31. |     With some extensions, it might be easy to provide both alternatives.
  32. |     For example, you can define functions with a "keyword" `INLINE' and
  33. |     define that as a macro to expand into either `inline' or nothing,
  34. |     depending on the compiler.
  35. |
  36. |     In general, perhaps it is best not to use the extensions if you can
  37. |     straightforwardly do without them, but to use the extensions if they
  38. |     are a big improvement.
  39.  
  40. It further suggests that widely-used programs such as emacs or compiler
  41. programs such as gcc should not use any extensions at all.
  42.  
  43. I think this is a reasonable position.  I don't think anyone on the C++
  44. standards committee believes that all C++ programs should be strictly
  45. conforming.
  46.  
  47. The GNU standards document also says that GNU programs should be
  48. upwardly compatible with the relevant ANSI and POSIX standards.
  49.  
  50. --
  51. Fergus Henderson                 WWW: http://www.cs.mu.oz.au/~fjh
  52. fjh@cs.mu.oz.au                  PGP: finger fjh@128.250.37.3
  53. ---
  54. [ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  55.   Contact address: std-c++-request@ncar.ucar.edu.  Moderation policy:
  56.   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html. ]
  57.